package site.lianwu.mybatis.plus.query.model;

import java.lang.reflect.Field;
import java.util.Collection;
import java.util.Set;

/**
 * 查询字段，封装查询注解所声明的{@code Field}信息
 *
 * @author LianWu
 * @see GeneralQueryField
 * @see NestedQueryField
 */
public abstract class QueryField {

    /**
     * 字段
     */
    protected final Field field;

    /**
     * 分组集合
     */
    protected final Set<String> groups;

    protected QueryField(Field field, Set<String> groups) {
        this.field = field;
        this.groups = groups;
    }

    public Field getField() {
        return field;
    }

    public Collection<String> getGroups() {
        return groups;
    }

}
